package cn.flant.cfg;

import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;

public class ConfigContext {
	private Set<String> keySet = new HashSet<String>();
	private String configFile;
	private String charset;
	private boolean isAutoLoad;

	public String getConfigFile() {
		return configFile;
	}

	public void setConfigFile(String configFile) {
		this.configFile = configFile;
	}

	public String getCharset() {
		return charset;
	}

	public void setCharset(String charset) {
		this.charset = charset;
	}

	public boolean isAutoLoad() {
		return isAutoLoad;
	}

	public void setAutoLoad(boolean isAutoLoad) {
		this.isAutoLoad = isAutoLoad;
	}

	public void addKey(String key) {
		keySet.add(key);
	}

	public Iterator<String> iterator() {
		return keySet.iterator();
	}

	public boolean hasKey(String key) {
		return keySet.contains(key);
	}

	public Set<String> getKeySet() {
		return keySet;
	}

	public void setKeySet(Set<String> keySet) {
		this.keySet = keySet;
	}

	public void clearKeySet() {
		this.keySet.clear();
	}
}
